home *** CD-ROM | disk | FTP | other *** search
- #ifndef _INLINE_EXPNAME_H
- #define _INLINE_EXPNAME_H
-
- #include <sys/cdefs.h>
- #include <inline/stubs.h>
-
- __BEGIN_DECLS
-
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL
- #define BASE_EXT_DECL0 extern struct Library * ExpnameBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME ExpnameBase
- #endif
-
- BASE_EXT_DECL0
-
- static __inline ULONG
- GetExpName (BASE_PAR_DECL STRPTR manufname,STRPTR prodname,struct ConfigDev *configdev,UWORD manufacturer,UBYTE product)
- {
- BASE_EXT_DECL
- register ULONG _res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register STRPTR a0 __asm("a0") = manufname;
- register STRPTR a1 __asm("a1") = prodname;
- register struct ConfigDev *a2 __asm("a2") = configdev;
- register UWORD d0 __asm("d0") = manufacturer;
- register UBYTE d1 __asm("d1") = product;
- __asm __volatile ("jsr a6@(-30)"
- : "=r" (_res)
- : "r" (a6), "r" (a0), "r" (a1), "r" (a2), "r" (d0), "r" (d1)
- : "a0","a1","a2","d0","d1", "memory");
- return _res;
- }
-
- static __inline STRPTR
- GetSysInfo (BASE_PAR_DECL STRPTR buffer,ULONG type,ULONG reserved)
- {
- BASE_EXT_DECL
- register STRPTR _res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register STRPTR a0 __asm("a0") = buffer;
- register ULONG d0 __asm("d0") = type;
- register ULONG d1 __asm("d1") = reserved;
- __asm __volatile ("jsr a6@(-36)"
- : "=r" (_res)
- : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
- : "a0","a1","d0","d1", "memory");
- return _res;
- }
-
- #undef BASE_EXT_DECL
- #undef BASE_EXT_DECL0
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-
- __END_DECLS
-
- #endif /* _INLINE_EXPNAME_H */
-